#!/bin/bash

echo "✅ 正在检查萤窗后端数据..."

# 1. 检查用户数据
echo "1. 检查用户数据..."
curl "http://localhost:8080/api/users/1"

# 2. 检查胶囊数据
echo "2. 检查胶囊数据..."
curl "http://localhost:8080/api/capsules/user/1"

# 3. 检查句子数据
echo "3. 检查句子数据..."
curl "http://localhost:8080/api/sentences/user/1"

# 4. 检查传递链数据
echo "4. 检查传递链数据..."
curl "http://localhost:8080/api/chains"

# 5. 检查 CORS（临时绕过）
echo "5. 检查 CORS（临时绕过）..."
curl -H "Origin: http://localhost:63342" -H "Access-Control-Request-Method: GET" -H "Access-Control-Request-Headers: X-User-Id" -X OPTIONS "http://localhost:8080/api/users/1"

echo "✅ 检查完成！"